bd75000fe88f1f3bd997a406999d6b51d9bbaf79,store/src/main/java/org/gephi/graph/api/types/TimestampMap.java,TimestampMap,getMaxDouble,#Interval#,395

Before Change


        if (size == 0) {
            return null;
        }
        double lowBound = interval.getLow();
        double highBound = interval.getHigh();
        int index = Arrays.binarySearch(array, lowBound);
        if (index < 0) {
            index = -index - 1;
        }

        double max = Double.NEGATIVE_INFINITY;
        boolean found = false;
        for (int i = index; i < size && array[i] <= highBound; i++) {
            double val = ((Number) getValue(i)).doubleValue();
            max = (double) Math.max(max, val);
            found = true;
        }

After Change


        if (size == 0) {
            return null;
        }
        int[] timestamps = getOverlappingTimestamps(interval.getLow(), interval.getHigh());
        if (timestamps.length == 0) {
            return null;
        }
        double max = Double.NEGATIVE_INFINITY;
        for (int i = 0; i < timestamps.length; i++) {
            double val = ((Number) getValue(timestamps[i])).doubleValue();
            max = Math.max(val, max);
        }
        return max;